#include<cstdio>
#include<cstring>
long long g[101];
int main()
{
	g[0]=0;
	g[1]=1;
	for(int i=2;i<=100;i++)
	{
		g[i]=3*g[i-1]+g[i-2];
		printf("g(%d)=%lld\n",i,g[i]);
	}
	return 0;
}

